/*
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-06-29 11:07:36
 * @LastEditTime: 2019-06-30 10:30:58
 * @Description: http://www.sbotlp.com.cn
 */
import { Schema } from '../../api/schema';
import { ValidateMethod } from '../../api/validate.method';
import * as _ from 'lodash';
const validate = new ValidateMethod();
const config = {
  id: (body: object, value: string) => validate.isEmpty(value) ? 'id不可以为空' : null,
  id1: (body: object, value: string) => validate.isEmpty(value) ? 'id1不可以为空' : null
}
export class SchemaService implements Schema {
  constructor() { }
  schema() {
    return config;
  }
  checkPaths(paths: any) {
    return _.pick(config, paths);
  }
}
